package com.amin.app.web.service;

import com.amin.app.web.entity.SDict;
import com.amin.app.web.mapper.DictMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 *字典实现类
 * 20210717
 */
@Service
public class DictService {
    final
    DictMapper dictMapper;

    public DictService(DictMapper dictMapper) {
        this.dictMapper = dictMapper;
    }


    public List<SDict> getDictList(SDict sDict) {
        return dictMapper.getDictList(sDict);
    }

    public List<SDict> getDictListByDictType(String dictType) {
        return dictMapper.getDictListByDictType(dictType);
    }

    public void save(SDict sDict) {
        dictMapper.save(sDict);
    }

    public SDict getDictById(Integer id) {
        return dictMapper.getDictById(id);

    }

    public void update(SDict sDict) {
        dictMapper.update(sDict);
    }

    public void delById(Integer id) {
        dictMapper.delById(id);
    }
}
